﻿<UserControl x:Class="ScrumTable.UI.View.WinTouch.UserControls.BarControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
    xmlns:Converter="clr-namespace:ScrumTable.UI.View.Converter;assembly=ScrumTable.UI.View" xmlns:UserControls1="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls" HorizontalAlignment="Stretch">
    <UserControl.Resources>
        <Converter:WidthConverter x:Key="WidthConverter"/>
    </UserControl.Resources>
    <Grid>
        <Border Margin="0,0,0,0" Background="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControls1:BarControl}}, Path=BackColor}" BorderBrush="Black" BorderThickness="0">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControls1:BarControl}}, Path=FirstValue, Converter={StaticResource WidthConverter}}" />
                    <ColumnDefinition Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControls1:BarControl}}, Path=SecondValue, Converter={StaticResource WidthConverter}}"/>
                </Grid.ColumnDefinitions>
                <Grid Grid.Column="0">
                    <Border Background="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControls1:BarControl}}, Path=FirstColor}" Padding="0" BorderBrush="Black" BorderThickness="0,0,0,0">
                        <Label FontFamily="Segoe UI" FontWeight="Bold" Content="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControls1:BarControl}}, Path=FirstValue}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="0" Foreground="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControls1:BarControl}}, Path=FirstColorText}" />
                    </Border>
                </Grid>
                <Grid Grid.Column="1">
                    <Border Background="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControls1:BarControl}}, Path=SecondColor}" BorderThickness="0">
                        <Label FontFamily="Segoe UI" FontWeight="Bold" Content="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControls1:BarControl}}, Path=SecondValue}" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="0" Foreground="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControls1:BarControl}}, Path=SecondColorText}" />
                    </Border>
                </Grid>
            </Grid>
        </Border>
    </Grid>
</UserControl>
